home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / subst.n < prev    next >
Encoding:
Text File  |  1995-02-22  |  1.3 KB  |  42 lines

  1. '\"
  2. '\" Copyright (c) 1994 The Regents of the University of California.
  3. '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) subst.n 1.4 95/02/22 14:37:27
  9. '\" 
  10. .so man.macros
  11. .HS subst tcl 7.4
  12. .BS
  13. '\" Note:  do not modify the .SH NAME line immediately below!
  14. .SH NAME
  15. subst \- Perform backslash, command, and variable substitutions
  16. .SH SYNOPSIS
  17. \fBsubst \fIstring\fR
  18. .BE
  19.  
  20. .SH DESCRIPTION
  21. .PP
  22. This command performs variable substitutions, command substitutions,
  23. and backslash substitutions on its \fIstring\fR argument and
  24. returns the fully-substituted result.
  25. The substitutions are performed in exactly the same way as for
  26. Tcl commands.
  27. As a result, the \fIstring\fR argument is actually substituted twice,
  28. once by the Tcl parser in the usual fashion for Tcl commands, and
  29. again by the \fIsubst\fR command.
  30. .PP
  31. Note: when it performs its substitutions, \fIsubst\fR does not
  32. give any special treatment to double quotes or curly braces.  For
  33. example, the script
  34. .DS
  35. \fBset a 44
  36. subst {xyz {$a}}\fR
  37. .DE
  38. returns ``\fBxyz {44}\fR'', not ``\fBxyz {$a}\fR''.
  39.  
  40. .SH KEYWORDS
  41. backslash substitution, command substitution, variable substitution
  42.